<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>用户中心</title>
    <%--<link rel="stylesheet" href="//res.layui.com/layui/dist/css/layui.css"  media="all">--%>
    <link rel="stylesheet" href="/gzht/lib/layui/css/layui.css" media="all">
    <style type="text/css">
        .layui-layout-admin .layui-side{
            width: 120px;
        }
        .layui-layout-admin .layui-side{
            width: 140px;
        }
        .layui-body{
            left: 140px;
        }
        .layui-layout-admin .layui-footer{
            left: 140px;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">用户管理中心</div>
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="/gzht/index">返回绘图</a></li>
            <%--<li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li>--%>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="/gzht/myselfInfo" target="page_frame">
                    <c:choose>
                        <c:when test="${empty admin.adminAvatarurl}">
                            <img src='/gzht/statics/img/default_user_head_img.jpg' class="layui-nav-img">
                        </c:when>
                        <c:otherwise>
                            <img src="${admin.adminAvatarurl.split('/gzht_imgs/head/')[1]}" class="layui-nav-img">
                        </c:otherwise>
                    </c:choose>
<%--                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">--%>
                    <shiro:principal property="adminLoginName"></shiro:principal>
                </a>
                <%--<dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>--%>
            </li>
            <li class="layui-nav-item"><a href="logout">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item">
                    <a class="" href="/gzht/myselfInfo" target="page_frame" style="font-size: 1rem;color:white;">个人中心</a>
                </li>
                <shiro:hasPermission name="limit_user_manager">
                    <li class="layui-nav-item">
                        <a class="" href="/gzht/userList" target="page_frame" style="font-size: 1rem;color:white;">用户管理</a>
                    </li>
                </shiro:hasPermission>
                <shiro:hasPermission name="limit_system_manager">
                    <li class="layui-nav-item">
                        <a class="" href="javascript:;" style="font-size: 1rem;color:white;">系统设置</a>
                        <dl class="layui-nav-child">
                            <dd><a href="/gzht/roleList" target="page_frame">角色管理</a></dd>
                            <dd><a href="/gzht/limitList" target="page_frame">权限管理</a></dd>
                            <dd><a href="/gzht/postList" target="page_frame">岗位设置</a></dd>
                            <dd><a href="/gzht/departmentList" target="page_frame">机构管理</a></dd>
                        </dl>
                    </li>
                </shiro:hasPermission>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <iframe id="page_frame" style='overflow-x:hidden; overflow-y:auto;' src="/gzht/myselfInfo" name="page_frame" width="100%" height="99%" frameborder="no" border="0" marginwidth="0"
                marginheight="0" scrolling="auto" allowtransparency="yes"></iframe>
    </div>

    <div class="layui-footer">
        © 甜橙科技-管柱绘图 V1.0.1
    </div>
</div>

<script src="/gzht/statics/js/jquery-1.12.2.min.js"></script>
<script src="/gzht/lib/layui/layui.js"></script>
<script>
    $(function () {
        $('body .layui-nav-item > a').on('click', function () {
            var ele = $(this);
            if (ele.next().hasClass("bg_alpha")) {
                ele.next().slideUp(function () {
                    ele.next().removeClass("bg_alpha")
                });
            } else {
                ele.next().addClass("bg_alpha")
                $(this).next().slideDown();
            }
        })
    })
</script>
</body>
</html>
